#ifndef FILTER_H
#define FILTER_H

#include "global.h"

class Filter
{
public:
    Filter() = default;
    vcgMesh *_vm;
    virtual void nonShrinking(int times = 0,bool local = false) = 0;
};

class FairSurface:public Filter
{
private:
    float lambda;
    float Kpb;
    float mu;

public:
    FairSurface();
    void setVertID();
    void nonShrinking(int times, bool local)override;
    void Taubin(vcgVertex *v,float scale);

    void setLambda(float lam){lambda = lam;}
    void setMu(float m){mu = -1.0f*m;}
    void setMu(){mu = lambda / (Kpb * lambda -1); }
};

#endif // FILTER_H
